Skip to content

Hotfix: neutralize UGC link spam and deindex user pages - #24

Merged
facundofarias merged 2 commits into
mainfrom
fix/ugc-spam-hotfix
Oct 25, 2026
Merged

facundofarias merged 2 commits into
mainfrom
fix/ugc-spam-hotfix

Conversation

@facundofarias

Copy link
Copy Markdown
Contributor

Incident

/explore and /public/* are being farmed as a dofollow link network:

  • 11,857 docs total; 11,780 anonymous; 11,771 public + indexed
  • 9,694 match gambling keywords, ramping from ~July 27 to 8,592 docs in August
  • Live feed: 39/40 newest docs were casino spam (EN/PT/ES/AR/DE/EL)

Root causes: anonymous public creation, docs in the sitemap, indexable /public/* + /explore, and dofollow links rendered from user markdown.

This PR (hotfix)

  • MarkdownPreview + CommentMarkdown: external links get rel="nofollow ugc noopener noreferrer" and target="_blank"; in-page anchors unchanged.
  • X-Robots-Tag: noindex, nofollow on /explore, /public/*, /share/*, /c/* (header + page metadata).
  • Sitemap: removes /explore and all user docs except verified-owner docs.
  • Explore page/API: only account-owned docs until moderation exists.
  • Tests for the robots header and explore filter.

Not in this PR (required follow-ups)

  1. Cloudflare WAF/rate limit on POST /api/v1/docs and comments.
  2. Verified-account or Turnstile gate for creating public docs.
  3. Back up prod, then quarantine the ~11.7k anonymous spam docs (clear seoSlug, 404/410).
  4. Search Console removal requests, then selectively re-enable indexing for verified owners.
  5. Long term: host user content on a separate subdomain.

Verification

  • npm run lint / npm run typecheck clean
  • 100 unit + 174 integration tests pass
  • npm run build succeeds

Anonymous public docs are being used as a dofollow link farm (~11.8k
docs, ~9.7k gambling-related, ramping since late July).

Hotfix:
- Render markdown and comment links with rel="nofollow ugc noopener
  noreferrer" so user content can never pass link equity.
- Send X-Robots-Tag: noindex, nofollow on /explore, /public/*, /share/*
  and /c/*; set the same in page metadata.
- Drop user docs and /explore from the sitemap; only verified-owner docs
  are submitted.
- Limit the explore page + API to account-owned docs while the spam
  backlog is cleaned up.

Tests cover the robots header and the explore ownership filter.
@facundofarias
facundofarias merged commit f320f1a into main Oct 25, 2026
2 checks passed
@facundofarias
facundofarias deleted the fix/ugc-spam-hotfix branch October 25, 2026 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant